using System;

namespace PharmacyPharnet.Core.Entity
{
	public class TypeInfo
	{
		protected int _id;
		protected Type _type;

		public TypeInfo()
		{		
		}

		public TypeInfo(int id, Type type)
		{
			if(	!type.IsSubclassOf(typeof(ControlViewBase)) &&
				!type.IsSubclassOf(typeof(DialogViewBase)))
			{
				throw new ArgumentException(type.FullName + " doesn't derive from ControlViewBase or DialogViewBase");
			}

			_id = id;
			_type = type;
		}
		
		public int Id 
		{ 
			get 
			{ 
				return _id; 
			} 
		}

		public Type Type
		{
			get
			{
				return _type;
			}
		}
	}
}
